<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
	<title>红酒会 - 智能红酒管家</title>
	<meta http-equiv="Content-Type" content="UTF-8">
	<link rel="shortcut icon" type="image/x-icon" href="${ctx}/favicon.ico" />
	<link rel="stylesheet" href="http://libs.baidu.com/bootstrap/2.3.2/css/bootstrap.min.css" />
	<link rel="stylesheet" href="http://libs.baidu.com/bootstrap/2.3.2/css/bootstrap-responsive.min.css" />
	<link rel="stylesheet" href="${ctx}/static/styles/style.css" />
	<style type="text/css">
		body {
  	 			background-color: #f5f5f5;
		}
		#c {
		    margin:auto;
		    border-radius:6px;
		}
	</style>
</head>
<body>

	<c:import url="/header" />
	<div style="padding-top:100px;"></div>
	<div class="container" id="container">
		<div class="row">			
			<div class="span12">
				<div class="well-small">
					<c:if test="${not empty errorMsg}">
						<div class="alert alert-error">
			  				<p>${errorMsg}</p>
						</div>
					</c:if>
					
					<form id="form" action="${ctx}/forgot" method="post" class="form-horizontal">
						<div class="control-group">
							<label class="control-label" for="username">用户名：</label>
							<div class="controls">
								<input type="text" id="username" name="username" placeholder="用户名">
								<span id="error_username" class="red"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="email">邮箱：</label>
							<div class="controls">
								<input type="text" id="email" name="email" placeholder="邮箱">
								<span id="error_email" class="red"></span>
							</div>
						</div>
						<div class="control-group">
							<div class="controls">
								<a href="javascript:;" class="btn" onclick="history.back();">&nbsp;&nbsp;返&nbsp;&nbsp;回&nbsp;&nbsp;</a>
								<button type="submit"  class="btn btn-primary">&nbsp;&nbsp;提&nbsp;&nbsp;交&nbsp;&nbsp;</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	
	<script type="text/javascript" src="${ctx}/static/scripts/jquery.validate.min.js"></script>
	<script type="text/javascript">
	$('#form').validate({
		rules: {
			username: 'required',
			email: 'required'
		},
		messages: {
			username: '请填写用户名',
			email: '请填写邮箱'
		},
		errorElement: 'em',
		errorPlacement: function(error, element) {
			error.appendTo($("#error_" + element.attr("id")));
		},
		submitHandler: function(form) {
			form.submit();
		}
	});
	</script>
</body>
</html>